package com.cn.wang.demo;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.AbstractQueue;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;

public class UrlDemo {
	public static void main(String[] args) throws IOException{
		Queue<String> queue = new LinkedList<String>();
		queue.offer("w");
		queue.offer("a");
		queue.offer("n");
		queue.offer("g");
		queue.remove("a");
//		AbstractQueue<String> abstractQueue = new AbstractQueue<String>();
		Iterator iterator = queue.iterator();
		while(iterator.hasNext()){
			String string = iterator.next().toString();
			System.out.println(string);
		}
//		 String content = "";
//		URL url = new URL("https://www.baidu.com");
//		HttpURLConnection connection = (HttpURLConnection) url.openConnection();
//	    connection.setDoInput(true);
//	    connection.setDoOutput(true);
//	    connection.setAllowUserInteraction(false);
//	    connection.setUseCaches(false);
//	    connection.setRequestMethod("POST");
//	    connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=GBK");
//	    BufferedWriter bout = new BufferedWriter(new OutputStreamWriter(connection.
//	            getOutputStream()));
//	        bout.write(content);
//	        bout.flush();
//	        bout.close();
	}

}
